package com.znf4.id.utils;


/**
 *   TODO... 无注释
 */
public class Example {

	public static void main(String[] args) {
		String tab = "order";
		long userId = 123456789;

		IdGeneratorUtil idGenerator = IdGeneratorUtil.builder()
				//.addHost("xxxxx", 6379, "xxxx", "c5809078fa6d652e0b0232d552a9d06d37fe819c")
//				.addHost("127.0.0.1", 8379, "Bc779Rd8OS2a6b8", "f55f781ca4a00a133728488e15a554c070b17255")
				.build();
		
		for (int num = 0; num < 10000; num++){
			long id = idGenerator.next(tab, userId);
			System.out.println("id[" + num +"]:" + id);
			//List<Long> result = IdGenerator.parseId(id);
			//System.out.println("miliSeconds:" + result.get(0) + ", partition:" + result.get(1) + ", seq:" + result.get(2));
		}
		
	}
}
